﻿@model ITProject.WebUI.Models.AccountRegistrationViewModel
@{
    ViewBag.Title = "Rejestracja";
    Layout = "~/Views/Shared/_Layout.cshtml";
}



<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Rejestracja</legend>
       <div class="editor">
        <div class="editor-label">
            @Html.LabelFor(model => model.Name) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Name)</p>
            @Html.TextBoxFor(model => model.Name, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">
        <div class="editor-label">
            @Html.LabelFor(model => model.Surname) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Surname)</p>
            @Html.TextBoxFor(model => model.Surname, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">
        <div class="editor-label">
            @Html.LabelFor(model => model.BirthDate) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.BirthDate)</p>
            @Html.TextBoxFor(model => model.BirthDate, new { @class = "cal", @Value = Model.BirthDate.ToString("yyyy/MM/dd") })
            
        </div>
        </div>
        <div class="editor">
        <div class="editor-label">
            @Html.LabelFor(model => model.Mail) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Mail)</p>
            @Html.TextBoxFor(model => model.Mail, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">
        <div class="editor-label">
            @Html.LabelFor(model => model.Login) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Login)</p>
            @Html.TextBoxFor(model => model.Login, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">

        <div class="editor-label">
            @Html.LabelFor(model => model.Password) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Password)</p>
            @Html.PasswordFor(model => model.Password, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">

        <div class="editor-label">
            @Html.LabelFor(model => model.Password2) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Password2)</p>
            @Html.PasswordFor(model => model.Password2, new { @class = "input" })
            
        </div>
        </div>
        <div class="editor">

        <div class="editor-label">
            @Html.LabelFor(model => model.Sex) <span class="validation">*</span>
        </div>
        <div class="editor-field">
        <p class="validation">@Html.ValidationMessageFor(model => model.Sex)</p>
            @Html.DropDownListFor(model => model.Sex, new List<SelectListItem> { new SelectListItem { Text = "Kobieta", Value = "K" }, new SelectListItem { Text = "Mężczyzna", Value = "M" } }, new { @class = "input" })
            
        </div>
        </div>
        
        <p class="validation" style="padding-left:50px">        
        *pola wymagane
        </p>
        
        <div class="DSubmit">
        <input type="reset" class="button" value="Wyczyść" />
            <input type="submit" class="button" value="Zarejestruj się" />
        </div>
    </fieldset>
}




